/**
 * ipassbook 0.6.0
 * Copyright (C)2009 wateray and contributors
 * wateray@gmail.com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

package com.wateray.ipassbook.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * @author wateray
 * @create 2009-5-28
 */
public class PassbookTrade implements Entity,Serializable{
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	
	private String tradeId;							
	private String inPassbookId;							
	private String inPassbookSubId;
	private String outPassbookId;							
	private String outPassbookSubId;	
	private String tradeDate;													
	private String tradeFlag;
	private double tradeRate;
	private String tradeUser;
	private double inAmount;		
	private double outAmount;
	private double tradeFee;
	private String feePayFlag;
	private double tradeTax;
	private String taxPayFlag;
	private String memo;
	private String regeditUserId;
	private Date regeditDate;
	private String updateUserId;
	private Date updateDate;
	
	public PassbookTrade(){}
	@Override
	public String getEntityId() {
		// TODO Auto-generated method stub
		return tradeId;
	}
	@Override
	public String getEntityName() {
		// TODO Auto-generated method stub
		return tradeId;
	}
	
	
    public String toString(){
    	StringBuffer sb = new StringBuffer();
    	sb.append("PassbookTrade[");
    	sb.append("tradeId=" + tradeId);
    	sb.append(",passbookDetailId=" + getInPassbookDetailId());
    	sb.append(",referPassbookDetailId=" + getOutPassbookDetailId());
    	sb.append(",feePayFlag=" + feePayFlag);
    	sb.append(",inAmount=" + inAmount);
    	sb.append(",tradeDate=" + tradeDate);
    	sb.append("]");	
    	
    	return sb.toString();
    }
    
    public String getInPassbookDetailId(){
    	return inPassbookId + inPassbookSubId;
    }
    public String getOutPassbookDetailId(){
    	return outPassbookId + outPassbookSubId;
    }
	/**
	 * @return the tradeId
	 */
	public String getTradeId() {
		return tradeId;
	}
	/**
	 * @param tradeId the tradeId to set
	 */
	public void setTradeId(String tradeId) {
		this.tradeId = tradeId;
	}
	/**
	 * @return the inPassbookId
	 */
	public String getInPassbookId() {
		return inPassbookId;
	}
	/**
	 * @param inPassbookId the inPassbookId to set
	 */
	public void setInPassbookId(String passbookId) {
		this.inPassbookId = passbookId;
	}
	/**
	 * @return the inPassbookSubId
	 */
	public String getInPassbookSubId() {
		return inPassbookSubId;
	}
	/**
	 * @param inPassbookSubId the inPassbookSubId to set
	 */
	public void setInPassbookSubId(String passbookSubId) {
		this.inPassbookSubId = passbookSubId;
	}
	/**
	 * @return the outPassbookId
	 */
	public String getOutPassbookId() {
		return outPassbookId;
	}
	/**
	 * @param outPassbookId the outPassbookId to set
	 */
	public void setOutPassbookId(String referPassbookId) {
		this.outPassbookId = referPassbookId;
	}
	/**
	 * @return the outPassbookSubId
	 */
	public String getOutPassbookSubId() {
		return outPassbookSubId;
	}
	/**
	 * @param outPassbookSubId the outPassbookSubId to set
	 */
	public void setOutPassbookSubId(String referPassbookSubId) {
		this.outPassbookSubId = referPassbookSubId;
	}
	/**
	 * @return the tradeDate
	 */
	public String getTradeDate() {
		return tradeDate;
	}
	/**
	 * @param tradeDate the tradeDate to set
	 */
	public void setTradeDate(String tradeDate) {
		this.tradeDate = tradeDate;
	}
	/**
	 * @return the feePayFlag
	 */
	public String getFeePayFlag() {
		return feePayFlag;
	}
	/**
	 * @param feePayFlag the feePayFlag to set
	 */
	public void setFeePayFlag(String inOutFlag) {
		this.feePayFlag = inOutFlag;
	}
	/**
	 * @return the tradeFlag
	 */
	public String getTradeFlag() {
		return tradeFlag;
	}
	/**
	 * @param tradeFlag the tradeFlag to set
	 */
	public void setTradeFlag(String tradeFlag) {
		this.tradeFlag = tradeFlag;
	}
	/**
	 * @return the inAmount
	 */
	public double getInAmount() {
		return inAmount;
	}
	/**
	 * @param inAmount the inAmount to set
	 */
	public void setInAmount(double amount) {
		this.inAmount = amount;
	}
	/**
	 * @return the outAmount
	 */
	public double getOutAmount() {
		return outAmount;
	}
	/**
	 * @param outAmount the outAmount to set
	 */
	public void setOutAmount(double outAmount) {
		this.outAmount = outAmount;
	}
	/**
	 * @return the tradeUser
	 */
	public String getTradeUser() {
		return tradeUser;
	}
	/**
	 * @param tradeUser the tradeUser to set
	 */
	public void setTradeUser(String tradeUser) {
		this.tradeUser = tradeUser;
	}
	/**
	 * @return the tradeRate
	 */
	public double getTradeRate() {
		return tradeRate;
	}
	/**
	 * @param tradeRate the tradeRate to set
	 */
	public void setTradeRate(double tradeRate) {
		this.tradeRate = tradeRate;
	}
	/**
	 * @return the tradeFee
	 */
	public double getTradeFee() {
		return tradeFee;
	}
	/**
	 * @param tradeFee the tradeFee to set
	 */
	public void setTradeFee(double tradeFee) {
		this.tradeFee = tradeFee;
	}
	/**
	 * @return the tradeTax
	 */
	public double getTradeTax() {
		return tradeTax;
	}
	/**
	 * @param tradeTax the tradeTax to set
	 */
	public void setTradeTax(double tradeTax) {
		this.tradeTax = tradeTax;
	}
	/**
	 * @return the memo
	 */
	public String getMemo() {
		return memo;
	}
	/**
	 * @param memo the memo to set
	 */
	public void setMemo(String memo) {
		this.memo = memo;
	}
	/**
	 * @return the regeditUserId
	 */
	public String getRegeditUserId() {
		return regeditUserId;
	}
	/**
	 * @param regeditUserId the regeditUserId to set
	 */
	public void setRegeditUserId(String regeditUserId) {
		this.regeditUserId = regeditUserId;
	}
	/**
	 * @return the regeditDate
	 */
	public Date getRegeditDate() {
		return regeditDate;
	}
	/**
	 * @param regeditDate the regeditDate to set
	 */
	public void setRegeditDate(Date regeditDate) {
		this.regeditDate = regeditDate;
	}
	/**
	 * @return the updateUserId
	 */
	public String getUpdateUserId() {
		return updateUserId;
	}
	/**
	 * @param updateUserId the updateUserId to set
	 */
	public void setUpdateUserId(String updateUserId) {
		this.updateUserId = updateUserId;
	}
	/**
	 * @return the updateDate
	 */
	public Date getUpdateDate() {
		return updateDate;
	}
	/**
	 * @param updateDate the updateDate to set
	 */
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	/**
	 * @return the taxPayFlag
	 */
	public String getTaxPayFlag() {
		return taxPayFlag;
	}
	/**
	 * @param taxPayFlag the taxPayFlag to set
	 */
	public void setTaxPayFlag(String taxPayFlag) {
		this.taxPayFlag = taxPayFlag;
	}

}
